<?php
	session_start();
	require_once("../db_connect.php");

	//管理者登録フォーム
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link rel="stylesheet"  href="../../css/admin.css" type="text/css" />
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.4/jquery.min.js"></script>
<script type="text/javascript" src="../js/jquery.corner.js"></script>
<script type="text/javascript">

	//未入力項目をチェックする
	function chValie() {
	// 入力必須項目（「,」で区切って追加可能）
	ess = new Array("Family_Name","Given_Name","Family_Kana","Given_Kana","Nick_Name","Login_ID","Password","K_Password","Phone_Number","eMail","K_eMail");
	for(i=0; i<ess.length; i++) {
	 txt = document.userForm.elements[ess[i]].value;
	 if(txt == "") {
	   alert("未入力の項目があります");
	   return false;
	 }
	}
	return true;
	}

	var pass_flg=0;
	var mail_flg=0;
	 $(document).ready(function(){
		 $('#pass').focusout(function(){
			 	if(pass_flg!=0){
					error_check("pass","re_pass","pass_error_check","パスワード");
			 	}
			 	pass_flg=1;
		 });
		 $('#re_pass').focusout(function(){
				error_check("pass","re_pass","pass_error_check","パスワード");
		 });
		 $('#mail').focusout(function(){
			 if(mail_flg!=0){
				error_check("mail","re_mail","mail_error_check","メールアドレス");
			 }
			 mail_flg=1;
		 });
		 $('#re_mail').focusout(function(){
				error_check("mail","re_mail","mail_error_check","メールアドレス");
		 });
	});

	function error_check(a,b,c,d){
		if($("#"+a).val()!=$("#"+b).val()){
			$('#'+c).html(d+"が一致しません");
		}else{
			$('#'+c).html("");
		}
	}

 </script>
 <title>管理者画面</title>
</head>
       <body>
		<div id="topmain" >
			<div id="topwaku">管理者登録</div>
				<div id="enpty"></div>
					<div id="topimage"><a href="manager_create.php" >管理者登録</a></div>
					<div id="topimage"><a href="ManagerLogout.php" >ログアウト</a></div>
		</div>
		<div id="leftmain">
			<div id="leftmainwaku">
				<div id="koumoku"><a href="../../manager_index.php" >・管理トップページ</a></div>
			</div>
		</div>
		<div id="centerup">
		<div id="centerwaku">
			<div id="centertitle">
				<div id="centerchara">新規管理者登録</div>
			</div>
			</div>
			<div id="centerinsert">
			<div id="centerinsert2">
	<form action="ManagerCreate.php" method="POST" name="userForm" onSubmit="return chValie()" >漢字(姓)　　　　　　　　<input type="text"
		name="Family_Name" />(名)<input type="text" name="Given_Name" /><br />
	フリガナ(姓)　　　　　　<input type="text" name="Family_Kana" />(名)<input type="text"
		name="Given_Kana" /><br />
	ログインID　　　　　　　<input type="text" name="Login_ID" /><br />
	パスワード　　　　　　　<input type="password" id="pass" name="Password" style="ime-mode:disabled;" /><br />
	確認パスワード　　　　<input type="password" id="re_pass" name="K_Password" style="ime-mode:disabled;" /><div id="pass_error_check" style="color:#ff0000"></div><br />
	<hr />
	<input type="submit" value="登録" /></form>
	</div>
</div>
</div>
    </body>
</html>
